package me.zxk.qwert_poetry.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CollectionRepository extends JpaRepository<Collection, Integer> {
    @Query("select c from Collection c where c.user.id = ?1") // TODO
    List<Collection> findAllByUserId(int userId);
}
